From 37f486b06e304f438b875bca611ed88ec44c6b4f Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 28 Apr 2006 08:30:52 +0100 Subject: [PATCH] Relax BUG_ON() state ment in increase_reservation() in balloon.c. When xen_feature(XENFEAT_auto_translated_physmap) = 1, phys_to_machine_mapping_valid(pfn) always returns true. Relaxed BUG_ON() for xen_feature(XENFEAT_auto_translated_physmap) = 1 case. Signed-off-by: Isaku Yamahata --- linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c index 46f587f6c0..925de702f6 100644 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c @@ -216,7 +216,8 @@ static int increase_reservation(unsigned long nr_pages) BUG_ON(page == NULL); pfn = page_to_pfn(page); - BUG_ON(phys_to_machine_mapping_valid(pfn)); + BUG_ON(!xen_feature(XENFEAT_auto_translated_physmap) && + phys_to_machine_mapping_valid(pfn)); /* Update P->M and M->P tables. */ set_phys_to_machine(pfn, frame_list[i]); -- 2.30.2